﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Edit.Master" AutoEventWireup="true" CodeBehind="BuildProjectArchiveView.aspx.cs" Inherits="Web.Views.ArchiveFlowView.BuildProjectArchiveView" %>


<%@ Register Src="../../UserControls/AttachmentManager.ascx" TagName="AttachmentManager"
    TagPrefix="uc1" %>
<asp:Content ID="Content4" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript" src="../../Javascript/UserControls.js"></script>
<script type="text/javascript">
    $(function () {
        var id = $("#ctl00_edit_h_arcvhive").val();
        var type = $("#ctl00_edit_h_archiveType").val();
        var op = getQueryStringValue('IsFromDataManage');
        if (op == 'true') {
            op = 'edit';
        }
        else {
            op = 'scan';
        }

        $("#btnAddPageFile").click(function () {
            var url;
            if (id == "") {
                url = "../ArchiveManage/PageFileEdit.aspx?op="+op+"&archiveType=" + type + "";
            }
            else {
                var url = "../ArchiveManage/PageFileEdit.aspx?op="+op+"&archiveId=" + id + "&archiveType=" + type + "";
            }
            var child = window.open(url, "新建卷内件");
        });
        $("#btnAppendPageFile").click(function () {
            var url = "../ArchiveManage/PageFileList.aspx?op="+op+"&archiveType=" + type + "";
            var child = window.open(url, "添加现有键");
        });
    });

    //改变排序
    function ChangeOrder(name, type, ev) {
        ev = ev || window.event; // 事件                  
        var target = ev.target || ev.srcElement; // 获得事件源
        var valueTag = $(target).parent().next();
        var value = parseInt(valueTag.text());
        if (type == "up") {
            value++;
            setCookie(name, value);
        }
        else {
            if (value > 0) {
                value--;
            }
            setCookie(name, value);
        }
        valueTag.text(value);
    }

    //查看详情
    function openViewPage(url) {
        window.open(url, "查看详情");
    }
</script>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="button" runat="server">
    <div class="toolbar2">
        <button type="button" class="sexybutton" runat="server" id="btnAddArchiveBack" onserverclick="btnAddArchiveBack_Click"><span><span><span class="add"><%=btnAddArchiveBackText %></span></span></span></button>
        <button type="button" class="sexybutton" runat="server" id="btnBack" onserverclick="btnBack_Click"><span><span><span class="transfer"><%=btnBackText %></span></span></span></button>
      </div>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="edit" runat="server">
<div style=" margin:10px; margin-right:10px;">
<fieldset>
<legend>著录项信息 <%=archiveTypeName %>
</legend>
<div>
<table cellpadding="0" cellspacing="0" width="100%" class="editTable">
<tr>
<th style="width:12%">档号</th><td style="width:20%"><asp:TextBox ID="txtArchiveNum" runat="server" Width="98%"></asp:TextBox></td>
<th style="width:12%">临时序号</th><td  style="width:20%"><asp:TextBox ID="txtTempOrderNum" runat="server" Width="98%"></asp:TextBox></td>
<th style="width:12%">来源</th><td><asp:TextBox ID="txtArchiveSource" runat="server" Width="98%"></asp:TextBox></td>
</tr>
<tr>
<th>全宗号</th><td><asp:TextBox ID="txtFullFondsNum" runat="server" Width="98%"></asp:TextBox></td>
<th><span class="require_info">*</span>归档单位</th><td><asp:TextBox ID="txtFileOrgName" runat="server" class="required" Width="98%"></asp:TextBox>
<asp:HiddenField ID="h_FileOrgID" runat="server" />
</td>
<th><span class="require_info">*</span>起日期</th><td><asp:TextBox ID="txtStartTime" runat="server" class="easyui-datebox "  Width="160px"></asp:TextBox></td>
</tr>
<tr>
<th>类别号</th><td><asp:TextBox ID="txtArchiveType" runat="server" Width="98%"></asp:TextBox>
<asp:HiddenField ID="h_ArchiveTypeId" runat="server" />
</td>
<th><span class="require_info">*</span>立卷单位</th><td><asp:TextBox ID="txtPublishOrgID" runat="server" class="" Width="98%"></asp:TextBox></td>
<th><span class="require_info">*</span>止日期</th><td><asp:TextBox ID="txtEndTime" runat="server" class="easyui-datebox "  Width="160px"></asp:TextBox></td>
</tr>
<tr>
<th rowspan="2"><span class="require_info">*</span>题名</th><td colspan="3" rowspan="2"><asp:TextBox ID="txtTitle" runat="server" Width="98%" TextMode="MultiLine" Rows="3"></asp:TextBox></td>

<th><span class="require_info">*</span>密级</th><td><asp:DropDownList ID="ddlSecurity" runat="server" Width="160px" class="easyui-combobox "  editable="false" ></asp:DropDownList></td>
</tr>
<tr>

<th><span class="require_info">*</span>保密期限</th><td><asp:DropDownList ID="ddlKeepSecurityTime" runat="server" Width="160px" class="easyui-combobox "  editable="false" ></asp:DropDownList></td>
</tr>
<tr>
<th><span class="require_info">*</span>保管期限</th><td><asp:DropDownList ID="ddlKeepTime" runat="server" Width="160px" class="easyui-combobox "  editable="false" ></asp:DropDownList></td>
<th><span class="require_info">*</span>载体类型</th><td><asp:DropDownList ID="ddlCarrierType" runat="server" Width="160px" class="easyui-combobox "  editable="false" ></asp:DropDownList></td>

</tr>
<tr>
<th><span class="require_info">*</span>页数</th><td><asp:TextBox ID="txtPageNum" runat="server" class=" number required" Width="98%" MaxLength="5"></asp:TextBox></td>
<th><span class="require_info">*</span>件数</th><td><asp:TextBox ID="txtPageFileNum" runat="server" class="number required" MaxLength="5" Width="98%"></asp:TextBox></td>
<th>正本数量</th><td><asp:TextBox ID="txtMainBodyNum" runat="server" class="number" MaxLength="5" Width="98%"></asp:TextBox></td>

</tr>
<tr>
<th>提要</th><td colspan="3"><asp:TextBox ID="txtSummary" runat="server" Width="98%" TextMode="MultiLine" Rows="3" Columns="20"></asp:TextBox></td>
</tr>
<tr>
<th>备注</th><td colspan="3"><asp:TextBox ID="txtRemark" runat="server" Width="98%" TextMode="MultiLine" Rows="3" Columns="20"></asp:TextBox></td>
</tr>
<tr>
<th>存放位置</th><td colspan="3"><asp:TextBox ID="txtStorageType" runat="server" Width="98%"></asp:TextBox></td>
<%--<th>文件编号</th><td><asp:TextBox ID="txtFileNum" runat="server" Width="98%"></asp:TextBox></td>--%>
</tr>
<tr>
<th>互见号</th><td colspan="3"><asp:TextBox ID="txtHujianhao" runat="server" Width="98%"></asp:TextBox></td>
</tr>
</table>
</div>
</fieldset>
<fieldset>
  <legend>装盒信息</legend>
  <table width="100%" cellpadding="0" cellspacing="0" class="editTable">
  <tr>
  <th  style="width:12%">盒号</th><td><asp:TextBox ID="txtBoxNum" runat="server" Width="140px" ></asp:TextBox></td>
  </tr>
  </table>

  </fieldset>
  <fieldset>
  <legend>扩展信息</legend>
  </fieldset>
  <fieldset>
  <legend>上交分发</legend>
  </fieldset>
  <uc1:AttachmentManager ID="attachArchive"  AttachmentDBHelperString="BuildProjectFile"   runat="server"  />
  <fieldset>
  <legend>卷内件列表</legend>
   <div class="toolbar2">
        <button type="button" class="sexybutton"  id="btnAddPageFile" ><span><span><span class="add">新建卷内件</span></span></span></button>
        <button type="button" id="btnAppendPageFile" class="sexybutton"   ><span><span><span class="add">添加现有件</span></span></span></button>
        <button type="button" class="sexybutton" runat="server" id="btnRemovePageFile" onserverclick="btnRemovePageFile_Click" ><span><span><span class="delete">从卷中移除</span></span></span></button>
        <button type="button" class="sexybutton" runat="server" id="btnDeletePageFile"  onserverclick="btnDeletePageFile_Click"><span><span><span class="delete">删除件</span></span></span></button>
        <button type="button" class="sexybutton" runat="server" id="btnSavePageFileOrder" onserverclick="btnSavePageFileOrder_Click" ><span><span><span class="transfer">保存卷内件顺序</span></span></span></button>
      </div>
      <ep:EPGridView ID="gv_PageFileView" runat="server" Width="100%" ShowCheckBox="true" DataKeyNames="DataID" 
        OnRowDataBound="gv_PageFileView_RowDataBound"  OnRowCommand="gv_PageFileView_RowCommond">
        <Columns>
        <asp:BoundField DataField="DATAID" HeaderStyle-Width="2%" ItemStyle-HorizontalAlign="Center" />  
        <asp:TemplateField>
          <HeaderStyle Width="4%" />
          <HeaderTemplate>详情</HeaderTemplate>
          <ItemStyle HorizontalAlign="Center" />
          <ItemTemplate>      
          <asp:Button class="btn" Text="详情" runat="server" ID="view" />
          </ItemTemplate>
          </asp:TemplateField>
                               <asp:ButtonField CommandName="up" HeaderText="上移" HeaderStyle-Width="5%" ItemStyle-HorizontalAlign="Center"
                        ControlStyle-CssClass="btn-img img-up" />
           <asp:ButtonField CommandName="down" HeaderText="下移" HeaderStyle-Width="5%" ItemStyle-HorizontalAlign="Center"
                        ControlStyle-CssClass="btn-img img-down" />
       <asp:BoundField HeaderText="序号" DataField="ordernum" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center" />
      <asp:BoundField HeaderText="全宗号" DataField="FullFondsNum" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center" />
      <asp:BoundField HeaderText="题名" DataField="TITLE" HeaderStyle-Width="20%" ItemStyle-HorizontalAlign="Center" />
     <asp:BoundField HeaderText="密级" DataField="F_SECURITYTYPE" HeaderStyle-Width="6%" ItemStyle-HorizontalAlign="Center" />
        <asp:BoundField HeaderText="保管期限" DataField="F_KEEPTIME" HeaderStyle-Width="8%" ItemStyle-HorizontalAlign="Center" />
         <asp:BoundField HeaderText="归档单位" DataField="FIleOrgID" HeaderStyle-Width="8%" ItemStyle-HorizontalAlign="Center" />
         <asp:BoundField HeaderText="文件日期" DataField="PublishTime" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="false" HeaderStyle-Width="8%" ItemStyle-HorizontalAlign="Center" />
      <asp:BoundField HeaderText="载体类型" DataField="F_CarrierType" HeaderStyle-Width="6%" ItemStyle-HorizontalAlign="Center" />
               <asp:BoundField HeaderText="互见号" DataField="Hujianhao" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
        </Columns>
        </ep:EPGridView>
         <ep:aspnetpager submitbuttontext=" GO " id="pagerdo" height="26px" width="100%" cssclass="yahoo2"
                    runat="server" pagesize="10" layouttype="Table" showcustominfosection="Right"
                    custominfoclass="custom" custominfostyle=" clear:both;" showpageindexbox="Auto"
                    submitbuttonimageurl="../Images/go.png" showpageindex="true" pageindexboxtype="TextBox"
                    custominfohtml="第 %CurrentPageIndex% 页，共 %PageCount% 页，每页显示 %PageSize% 条，共 %RecordCount% 条"
                    onpagechanging="pagerTransfered_PageChanging" alwaysshow="false">
                </ep:aspnetpager>
      </fieldset>
  <h3>审核进度</h3>
  <ep:EPGridView ID="gv_AprroveView" runat="server" Width="100%"></ep:EPGridView>
  </div>
    <asp:HiddenField ID="h_arcvhive" runat="server" />
  <asp:HiddenField ID="h_archiveType" runat="server" />
      <!--接收到的卷内件数据-->
  <asp:HiddenField ID="h_PageFileData" runat="server" />
  <input type="button" id="hidBtn" runat="server" onserverclick="btnHid_Click" style=" display:none;" />
   <asp:HiddenField ID="hiddenCurrentFlowName" runat="server" Value="审核通过" />
</asp:Content>
